<?php 
include("includes/chuyendau.php");
include("includes/Function.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
 <title><? echo $title;?></title>
 <meta name="DESCRIPTION" content="<? if(isset($description)){ echo $description;}else{echo $title;}?>"/>
 <meta name="KEYWORDS" content="<? if(isset($description)){ echo $tags;}else{echo $title;}?>"/>
 <meta name="ROBOTS" content="index,follow"/>
 <meta name="AUTHOR" content="<? echo $TenSite;?>"/>
 <meta http-equiv="EXPIRES" content="0"/>
 <meta name="RESOURCE-TYPE" content="DOCUMENT"/>
 <meta name="DISTRIBUTION" content="GLOBAL"/>
 <meta name="COPYRIGHT" content="Copyright (c) by <? echo $TenSite;?>"/>
 <meta name="Googlebot" content="index,follow,archive"/>
 <meta name="RATING" content="GENERAL"/>

 <!-- base href="<? echo $link;?>" -->
 <link rel="shortcut icon" href="images/favicon.ico?v=19.434"/> 
 
 <link href="css/style.css" rel="stylesheet" type="text/css"/>
 <link href="css/style_new.css" rel="stylesheet" type="text/css"/>
 <link href="css/styleNew.css" rel="stylesheet" type="text/css"/>
 <link href="css/style_ver6.css" rel="stylesheet" type="text/css"/>
 <link rel="stylesheet" href="css/jNice.css" type="text/css"/>
 <link rel="stylesheet" href="css/style_cart.css" type="text/css"/>
 <link rel="stylesheet" href="css/jscrollpane.css" type="text/css"/>
 <link rel="stylesheet" href="css/jquery.css" type="text/css"/>
 <link rel="stylesheet" href="css/style_shop.css" type="text/css"/>

 <link href="css/default.css" rel="stylesheet" type="text/css"/>
 <script type="text/javascript">
  RD_TOOLS = 1,
  LAZY_LOAD = 'off',
  TIME_NOW = 1365867355,
  COOKIE_ID = "mc",
  IS_MOBILE_MODE = 0,
  USER_COMMENT = 0  ,
  IS_ACTIVE_PHONE = 1,
  CUSTOMER_PROVINCE = 0,
  IS_ROOT = 0,
  IS_ADMIN = 0,ADMIN_PROVINCE = "0",IS_CUSTOMER_LOGIN = 0,
  IS_LOGIN = 0,
  IS_ANDROID = 0;
  </script>
 <script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/core.js"></script>
<script type="text/javascript" src="js/mb.js"></script> 
<script type="text/javascript" src="js/header.js"></script>
<script type="text/javascript" src="js/product.js"></script>
<script type="text/javascript" src="js/customer.js"></script>
<script type="text/javascript" src="js/gold.js"></script>
<script type="text/javascript" src="js/cart.js"></script>
<script type="text/javascript" src="js/cart_promotion.js"></script>
<script type="text/javascript" src="js/search.js"></script>
<script type="text/javascript" src="js/jtip.js"></script>
<script type="text/javascript" src="js/district.js"></script>
<script type="text/javascript" src="js/jquery_002.js"></script>
<script type="text/javascript" src="js/jquery_003.js"></script>
<script type="text/javascript" src="js/jquery_004.js"></script>
<script type="text/javascript" src="js/jquery_005.js"></script>
<script type="text/javascript" src="js/jquery_007.js"></script>
<script type="text/javascript" src="js/footer.js"></script>
<script type="text/javascript" src="js/jquery_006.js"></script>
<script type="text/javascript" src="js/homecat.js"></script>
  <script type="text/javascript">
   var _gaq = _gaq || [];
   _gaq.push(['_setAccount', 'UA-16561602-7']);
   _gaq.push(['_trackPageview']);
   (function() {
     var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
     ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
   })();
  </script> 
<meta name="google-site-verification" content=""/>
</head>
<body style="background:#e7e7e7 "> 
<div class="wrap">
<div class="header">			 
<div class="headerBg fixPNG ">
<div class="headerWidth">
<div class="headerTop">
<h2 class="headerLogo fl fixPNG m0" style="background-image: url('images/LoGo.png?v=10.12')">
<a href="<?php echo $link;?>" title="<? echo $TenSite;?>: <? echo $KhauHieu;?>"><img src="images/mua-chung-vn.gif" alt="<? echo $TenSite;?>" title="<? echo "$TenSite - $KhauHieu";?>" height="59" width="216"></a>
</h2>
<div class="headerTabMenu fl">
 
<?php
$stt=0;
$sql = @mysql_query("select * from baiviet where KichHoat = '1' and Loai = 'Menu' order by SapXep asc, IDBaiViet asc");
while ($rows = @mysql_fetch_array($sql))
{ $stt=$stt+1;
   if($stt==1){
    $class='ichome';
   }else{
    $class='ictour fl';
   }
   if(strpos($rows['NoiDung'],$_SERVER["REQUEST_URI"])>0){
    if($_SERVER["REQUEST_URI"]=='/'){
        if($stt==1){
        $activeTab=' buttonDealactive';
        }else{
        $activeTab='';
        }
    }else{
        $activeTab=' buttonDealactive';
    }
     
   }else{
    $activeTab='';
   }
   echo '<a href="'.$rows['NoiDung'].'" class="buttonDeal'.$activeTab.'">
<span class="'.$class.'">'.$rows['TieuDe'].'</span>
</a> '; 
}
?> 

</div><?php if(isset($_SESSION['username'])){
    ?>
    <div style="font-weight: bold;float: right;margin: 10px;color: white;"> Chào <?php echo $_SESSION['username'];?>
     <a href="Thoat.html" class="" style="color: yellow;">
Thoát
</a></div>
 <?}?>
<div class="c"></div>
</div>
<div class="headerBottom ">
<div class="headerFloat">
<div class="fixPNG topCat <?php if($_SERVER["REQUEST_URI"]=="/"||$_SERVER["REQUEST_URI"]=="/index.html"){
    echo 'topCatHover';
    }else{
        echo 'oneBoder';
        }?>        oder">
<div class="title fixPNG" onclick="shop.header.menuCatClick()"><div>Danh mục quận</div></div>
<div class="content"><ul class="categoryDeals2" style="padding:0 0 10px">
<?php
$sql = @mysql_query("select * from danhmuc where TrangThai = '1' order by SapXep asc, IDDanhMuc asc");
while ($rows = @mysql_fetch_array($sql))
{
   $SoDuAn=mysql_num_rows(@mysql_query("select * from duan where TrangThai = '1' and DanhMuc = '".$rows['IDDanhMuc']."'"));
   if($SoDuAn==0){
    $NumberDuAn='';
   }else{
    $NumberDuAn="(<b>$SoDuAn</b>)";
   }
   if($_GET['MaDanhMuc']==$rows['IDDanhMuc']){
    $Nactive='active';
   }else{
    $Nactive="";
   }
    $url=stripUnicode($rows['TenDanhMuc']);
    $url=ereg_replace('[[:space:]]+', '-', trim($url));
   echo '<li class="'.$Nactive.'">
<a href="'.$link.'Danh-Muc-'.$rows['IDDanhMuc'].'-'.$url.'.html" class="fixPNG"><span>'.$rows['TenDanhMuc'].' '.$NumberDuAn.'</span> &nbsp;</a>
<div class="c"></div>
</li>'; 
}
?>
</ul>
<div class="c"></div></div>
</div>
<?php 
if($_SERVER["REQUEST_URI"]=="/"||$_SERVER["REQUEST_URI"]=="/index.html"){
include("template/DivHoTro.php");
}
?>
	  </div>	  <!--Fix IE 7-->
<div class="c"></div>
<div>
<?php
$sqlb = @mysql_query("select * from duan where IDDuAn = '".$_GET['MaDuAn']."'");
$rowsb = @mysql_fetch_array($sqlb);
$TenDuAn=$rowsb['TenDuAn'];
$sqla = @mysql_query("select * from danhmuc where IDDanhMuc = '".$_GET['MaDanhMuc']."' or IDDanhMuc = '".$rowsb['DanhMuc']."'");
$rowsa = @mysql_fetch_array($sqla);
$TenDanhMuc=$rowsa['TenDanhMuc'];

?>
<div class="headerCity">
<div class="title">
<div class="currentBg" id="29"><?php 
if($_SERVER["REQUEST_URI"]=="/"||$_SERVER["REQUEST_URI"]=="/index.html"){
     echo 'Tìm kiếm';
    }else{
      echo '<b style="color:blue">'.$TenDanhMuc.'</b>'; 
    }
    require_once("includes/DangOnline.php");
    ?></div>
</div>
 
</div>
 
<script>
function TimKiem(){
    TuKhoa=document.getElementById("inputSearch").value;
    if(TuKhoa==""||TuKhoa=="Tìm chung cư..."){
        alert("Bạn vui lòng nhập từ khóa cần tìm !");
    }else{
        window.location.href='Tim-Kiem.html?TuKhoa='+TuKhoa+'';
    }
}
</script>
<div class="searchBox" style="width: 50%;">
<div class="searchBoxLeft">
<div class="searchBoxRight">
<input name="keyword" value="Tìm chung cư..." class="inputSearch" id="inputSearch" autocomplete="off" onfocus="if(this.value==this.title) this.value='';" onblur="if(this.value=='') this.value=this.title;" title="Tìm chung cư..." type="text">
<input class="btnsearch" value="" onclick="TimKiem();" type="button"/>
</div>
</div>
<div style="display: none;" id="autoComplete" class="autoComplete hidden">
<div class="completeContent" id="completeContent"></div>
</div>
</div>
 
</div>